# Maintainer: Eli Schwartz <eschwartz@archlinux.org>
# Contributor: Alexandre Filgueira <alexfilgueira@antergos.com>
# Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=cinnamon-session
pkgver=5.6.0
pkgrel=1
pkgdesc="The Cinnamon Session Handler"
arch=('loong64' 'x86_64')
url="https://github.com/linuxmint/${pkgname}"
license=('GPL' 'LGPL')
depends=('cinnamon-desktop' 'libsm' 'libcanberra' 'xapps' 'libxtst')
optdepends=('cinnamon-translations: i18n')
makedepends=('meson' 'samurai' 'xtrans')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
sha256sums=('dbe5db1075b95105debe582ec5c41171d67b2472c05ebe04a9bbe1a2b33a6ca0')
b2sums=('ecd8152af4784affc8c9b8ae7ca48adaecca4355c2db5d64ca577f44abc0ff35cf27ef324fa9d3520c125bc979727bbab67f99209e5a641ad0329a26025698b5')

build() {
    mkdir -p ${pkgname}-${pkgver}/build
    cd ${pkgname}-${pkgver}/build

    meson --prefix=/usr \
          --libexecdir=lib/${pkgname} \
          --buildtype=plain \
          ..
    samu
}

package() {
    cd ${pkgname}-${pkgver}/build

    DESTDIR="${pkgdir}" samu install
}
